<?php get_header(); ?>
<?php get_sidebar(); ?>
	<div id="content">

	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
		<div class="navigation">
			<div class="alignleft" id="boxme"><?php previous_post_link('&laquo; %link') ?></div>
			<div class="alignright" id="boxme"><?php next_post_link('%link &raquo;') ?></div>
		</div>

		<div class="post" id="post-<?php the_ID(); ?>">
        <!---->
        <table width="320" border="0" cellspacing="1" bgcolor="#000000">
          <?php $weekday_color = '#000000';
			  $weekday_text = '幾';
			  $weekday=get_the_time(w);
		switch ($weekday){
			case '0':
				$weekday_color = '#990000';
				$weekday_text = '日';
				break;
			case '1':
				$weekday_color = '#000000';
				$weekday_text = '壹';
				break;			
			case '2':
				$weekday_color = '#000000';
				$weekday_text = '貳';			
				break;			
			case '3':
				$weekday_color = '#000000';
				$weekday_text = '參';
				break;			
			case '4':
				$weekday_color = '#000000';
				$weekday_text = '肆';				
				break;			
			case '5':
				$weekday_color = '#000000';
				$weekday_text = '伍';
				break;			
			case '6':
				$weekday_color = '#006600';
				$weekday_text = '陸';
				break;				
		}
		?>
          <tr align="center" valign="middle">
            <td width="20" height="50" rowspan="2" align="center" bgcolor="#FFFFFF"><img src="images/time.gif" alt="time" width="20" height="50" align="bottom" /></td>
            <td height="10" align="right" bgcolor="#FFFFFF" class="posttimetag">月</td>
            <td height="10" align="right" bgcolor="#FFFFFF" class="posttimetag">日</td>
            <td height="10" align="right" bgcolor="#FFFFFF" class="posttimetag">年</td>
            <td height="10" align="right" bgcolor="#FFFFFF" class="posttimetag">時</td>
            <td height="10" align="right" bgcolor="#FFFFFF" class="posttimetag">分</td>
            <td align="right" bgcolor="#000000" class="posttimetag"><div style="color:#FFFFFF">
                <?php the_time('W'); ?>
              /
              <?php the_time('D'); ?>
            </div></td>
          </tr>
          <tr align="center" valign="middle" bgcolor="#000000">
            <td width="20" height="40" bgcolor="#FFFFFF" class="post-time"><?php the_time('m'); ?></td>
            <td width="20" height="40" bgcolor="#FFFFFF" class="post-time"><?php the_time('d'); ?>
                </span></td>
            <td width="20" height="40" bgcolor="#FFFFFF" class="post-time"><?php the_time('y'); ?>
                </span></td>
            <td width="20" height="40" bgcolor="#FFFFFF" class="post-time"><?php the_time('H'); ?>
                </span></td>
            <td width="20" height="40" bgcolor="#FFFFFF" class="post-time"><?php the_time('i'); ?>
                </span></td>
            <td align="right" bgcolor="<?php echo($weekday_color); ?>" class="post-time-day"><?php echo($weekday_text) ?></td>
          </tr>
        </table>
        <table width="450" border="0" cellspacing="1" bgcolor="#000000">
  <tr>
    <td width="20" height="50" valign="middle" bgcolor="#FFFFFF"><img src="images/title.gif" alt="title" width="20" height="50" align="bottom" />   </td>
    <td width="430" valign="middle" background="images/post-title-bg.gif" bgcolor="#FFFFFF"><span class="post-title">
      <?php the_title(); ?>
    </span></td>
  </tr>
</table>
        <table width="450" border="0" cellspacing="1" bgcolor="#000000">
          <tr>
            <td width="20" height="50" rowspan="2" bgcolor="#FFFFFF"><img src="images/info.gif" alt="title" width="20" height="50" align="bottom" /></td>
            <td width="25" height="25" bgcolor="#FFFFFF"><div align="center"><img src="images/people_pix.png" alt="言" /></div></td>
            <td width="146" bgcolor="#FFFFFF"><span class="postmetadata-big">
              <?php the_author_posts_link('namefl'); ?>
              <?php edit_post_link('edit', ' &#187 ', ''); ?>
              <?php if(function_exists('the_views')) {' | '. the_views(); } ?>
            </span></td>
            <td width="25" height="25" bgcolor="#FFFFFF"><div align="center"><img src="images/catagory_pix.png" alt="類" /></div></td>
            <td bgcolor="#FFFFFF"><span class="postmetadata">
              <?php the_category(' | ') ?>
            </span></td>
          </tr>
          <tr>
            <td height="25" colspan="2" bgcolor="#FFFFFF"><?php comments_rss_link('Comments RSS 2.0'); ?></td>
            <td width="25" height="25" bgcolor="#FFFFFF"><div align="center"><img src="images/tags_pix.png" alt="別" /></div></td>
            <td bgcolor="#FFFFFF"><span class="postmetadata">
              <?php the_tags('',' | ',''); ?>
            </span></td>
          </tr>
        </table>
        <!---->

			<div class="entry">
				<?php the_content(); ?>
                <li style="padding:0px; margin:0px; list-style:none; border: #dddddd solid 1px" ></li><br />
                <?php if(function_exists('the_ratings')) {the_ratings(); } ?><br />
                 <?php if (function_exists('sharethis_button')) { sharethis_button(); } ?><br />
                 ________*
				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
					<small>
						<?php if (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
							// Only Pings are Open ?>
                              <li style="padding:0px; margin:0px; list-style:none; border: #dddddd solid 1px" ></li><br />
							Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
							// Comments are open, Pings are not ?>
                              <li style="padding:0px; margin:0px; list-style:none; border: #dddddd solid 1px" ></li><br />
							You can skip to the end and leave a response. Pinging is currently not allowed.

						<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
							// Neither Comments, nor Pings are open ?>
                              <li style="padding:0px; margin:0px; list-style:none; border: #dddddd solid 1px" ></li><br />
							Both comments and pings are currently closed.

						<?php } ?>

					</small>
                    </div>
		</div>

				
	<?php comments_template(); ?>

	<?php endwhile; else: ?>

		<p>Sorry, no posts matched your criteria.</p>

<?php endif; ?>
<?php get_footer(); ?>
	</div>


